<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>数组处理</title>
		<script>
			var a=["龙凯","小马","小孟","大牛","姜传奇","马士威","jacky"];
			var n=prompt("给数组加一个新值：","马晓波");
			a.push(n);
			//alert(a.join("#"));
			//for(var i=0;i<a.length;i++){
			//	alert(a[i]);
			//}
			//i不是数组的每个值，是下标
			for(var i in a){
				console.log(i,"==="+a[i]);
			}
			console.log(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>");
			for(var o of a){
				console.log(o);
			}
		</script>
	</head>
	<body>
	</body>
</html>